package org.dant.ant.extension.net.processors;

public class SysInfo {

  public String getOSName() {
    return System.getProperty("os.name");
  }

  public String getOSArch() {
    return System.getProperty("os.arch");
  }

  public String getOSVersion() {
    return System.getProperty("os.version");
  }

  public String getUserName() {
    return System.getProperty("user.name");
  }

  public String getUserHome() {
    return System.getProperty("user.home");
  }

  public String getUserDir() {
    return System.getProperty("user.dir");
  }

  public String getJavaVersion() {
    return System.getProperty("java.version");
  }

  public String getJavaVendor() {
    return System.getProperty("java.vendor");
  }
  
  public String getJavaHome() {
    return System.getProperty("java.home");
  }

  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("\nOS Name: ");
    sb.append(getOSName());
    sb.append("\nOS Arch: ");
    sb.append(getOSArch());
    sb.append("\nOS Version: ");
    sb.append(getOSVersion());
    sb.append("\nUser Name: ");
    sb.append(getUserName());
    sb.append("\nUser Home: ");
    sb.append(getUserHome());
    sb.append("\nUser Dir: ");
    sb.append(getUserDir());
    sb.append("\nJava Home: ");
    sb.append(getJavaHome());
    sb.append("\nJava Vendor: ");
    sb.append(getJavaVendor());
    return sb.toString();
    
  }
}
